<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="utf-8" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="/image/png">

    <title>Registration</title>

    <link href="/css/style.css" rel="stylesheet">
    <link href="/css/style-responsive.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="/js/html5shiv.js"></script>
    <script src="/js/respond.min.js"></script>
    <![endif]-->
</head>

<body class="login-body">

<div class="container">

    <form class="form-signin" action="/user/register" method="post">
        <div class="form-signin-heading text-center">
            <h1 class="sign-title">新用户注册</h1>
            <img src="/images/login-logo.png" alt=""/>
        </div>


        <div class="login-wrap">
            <span id="msg" style="color: red; font-size: 12px">${sessionScope.msg}</span>
            <input type="text" name="username" autofocus="" placeholder="用户名" class="form-control">
            <input type="password" name="password" placeholder="密码" class="form-control">
            <input type="password" name="repassword" placeholder="确认密码" class="form-control">
<%--            验证码 --%>
            <span>请输入验证码:</span>
            <div>
                <input type="text" name="code"  class="form-control">
                <img id="code" src="/user/getCode" alt="" title="${sessionScope.code}">
<%--                使用事件的形式,点击的时候重新访问/user/getCode--%>
                <a href="javascript:;" onclick="document.getElementById('code').src = '/user/getCode?' + (new Date().getTime())">换一张？</a>
            </div>
            <label class="checkbox">
                <input type="checkbox" value="agree this condition"> 我同意服务条款和隐私政策
            </label>
            <button type="submit" class="btn btn-lg btn-login btn-block">
                <i class="fa fa-check"></i>
            </button>

            <div class="registration">
                已经注册。
                <a href="/user/login.jsp" class="">
                    去登陆
                </a>
            </div>

        </div>

    </form>

</div>


<!-- Placed js at the end of the document so the pages load faster -->
<script src="/js/jquery-1.10.2.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/modernizr.min.js"></script>

</body>
</html>
